package hehe.log.collect.async;


/**
 * 守护线程
 *<B>说明：</B>
 *<pre>
 * 略
 *</pre>
 *<B>示例：</B>
 *<pre>
 *  略
 *</pre>
 *<B>日志：</B>
 *<pre>
 *  略
 *</pre>
 *<B>注意事项：</B>
 *<pre>
 *  略
 *</pre>
 */
public class Daemon implements Runnable
{
    AsyncCollect asyncCollect;

    public Daemon(AsyncCollect asyncCollect)
    {
        this.asyncCollect = asyncCollect;
    }


    public void run()
    {
        while (true) {
            try {
                Thread.sleep(200);
                this.asyncCollect.flushMessage();

            } catch (InterruptedException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }
    }
}
